package com.ByteDance.model.vo;

import com.ByteDance.utils.StatusConstant;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.Setter;

@Data
public class RelationVO {
    @Setter(onMethod_ = {@JsonProperty("status_code")})
    @ApiModelProperty("状态码，0-成功，其他值-失败")
    private Integer statusCode;

    @Setter(onMethod_ = {@JsonProperty("status_msg")})
    @ApiModelProperty("状态描述")
    private String statusMsg;

    @Setter(onMethod_ = {@JsonProperty("user_list")})
    @ApiModelProperty("用户信息列表")
    private User[] userList;


    public static RelationVO success(){
        RelationVO relationVO = new RelationVO();
        relationVO.setStatusCode(StatusConstant.StatusEnum.SUCCESS.getCode());
        relationVO.setStatusMsg(StatusConstant.StatusEnum.SUCCESS.getMsg());
        return relationVO;
    }

    public static RelationVO fail(){
        RelationVO relationVO = new RelationVO();
        relationVO.setStatusCode(StatusConstant.StatusEnum.FAIL.getCode());
        relationVO.setStatusMsg(StatusConstant.StatusEnum.FAIL.getMsg());
        return relationVO;
    }
}
